import unittest, requests

from ddt import ddt, file_data

@ddt
class Register_02(unittest.TestCase):

    @file_data('register.yaml')
    def test_01(self, username, password):
        register = requests.post(
            url='http://10.59.9.14:7003/api/register',
            json={"username":username,"password":password}
        )
        print(register.json())
        self.assertEqual(0, register.json()['status'])

if __name__ == '__main__':
    unittest.main()